<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 1. 声明之后不允许改变
        // 2. 一但声明必须初始化，否则会报错
        const a = 1;
        // const b; // Uncaught SyntaxError: Missing initializer in const declaration 在定义时未初始化常量
        console.log(a); // Uncaught TypeError: Assignment to constant variable. 无法分配常量的值
        a = 3;

        
</script>
</body>

</html>